<%@ page language="java" contentType="text/html; charset=iso-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="stock.database.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="stock.commons.DBLoader"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>...:::Recar S.A.:::...</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">

</head>
<body>
<center><strong>Reporte de Stock Recar S.A.</strong></center>
<br />
<table width="800" align="center">
	<tr class="Estilo1" align="center" bgcolor="#000000">
		<td><strong>ID</strong></td>
		<td><strong>DESCRIPCION</strong></td>
		<td><strong>STOCK ACTUAL</strong></td>
		<td><strong>MOVIMIENTOS X MES</strong></td>
		<td><strong>STOCK EN 3 MESES</strong></td>
  </tr>
	<%
		GetSelect gsstock = new GetSelect();
		ResultSet rs = gsstock
				.getValues("SELECT * FROM reportefinal r order by stockfuturo asc;");
		while (rs.next()) {

			String id = rs.getString(1);
			String nombre = rs.getString(2);
			int stock = rs.getInt(3);
			int movimientos = rs.getInt(4);
			int stockfuturo = rs.getInt(5);
			String color = null;
			if (stockfuturo < 0){
				color = "Estilo2";
			} else if (stockfuturo >= 0 && stockfuturo < 25){
				color = "Estilo3";
			}else{
				color = "Estilo4";
			}
	%>
	<tr class=<%=color%> align="center">
		<td><%=id%></td>
		<td><%=nombre%></td>
		<td><%=stock%></td>
		<td><%=movimientos%></td>
		<td><%=stockfuturo%></td>
	</tr>
	<%
		}
	%>
</table>
</body>
</html>